Skip to content

Show Major/minor stats on per-iteration gc benchmarks#489

Merged
eightbitraptor merged 3 commits intomainfrom
mvh-add-gc-stats
Mar 17, 2026
Merged

Show Major/minor stats on per-iteration gc benchmarks#489
eightbitraptor merged 3 commits intomainfrom
mvh-add-gc-stats

Conversation

@eightbitraptor
Copy link
Contributor

@eightbitraptor eightbitraptor commented Mar 12, 2026

This adds some extra info to each benchmark run:

itr:   time   marking  sweeping  gc_count     major     minor  maj/min
#20: 3098ms      77.0ms     106.0ms        64         0        64      0.00
#21: 3053ms      41.0ms     102.0ms        66         1        65      0.02
#22: 3092ms      76.0ms     103.0ms        64         0        64      0.00
#23: 3049ms      38.0ms     102.0ms        66         1        65      0.02
#24: 3093ms      72.0ms     106.0ms        64         0        64      0.00
#25: 3058ms      47.0ms     103.0ms        73         0        73      0.00
RSS: 50.1MiB
MAXRSS: 61.7MiB
Average of last 10, non-warmup iters: 3072ms
Average marking time: 58.0ms
Average sweeping time: 104.0ms

It also adds a small heap utilisation table once each benchmark has finished all it's runs

Heap utilisation (after full GC):
heap  slot_size  eden_slots  live_slots  free_slots  eden_pages  live_pct  mem_KiB
   0         40       19649       13490        6159           12     68.7%    768.0
   1         80      163638      135329       28309          200     82.7%  12800.0
   2        160        3272        1530        1742            8     46.8%    512.0
   3        320         611          12         599            3      2.0%    192.0
   4        640         305          49         256            3     16.1%    192.0

and adds some gc information to the summary table:

-------  -------------  ----------------  -----------------  ---------------  --------------------  ---------------------  ------------------  -----------------  ----------------------  -----------------------
bench      master (ms)  master mark (ms)  master sweep (ms)  experiment (ms)  experiment mark (ms)  experiment sweep (ms)  experiment 1st itr  master/experiment  mark master/experiment  sweep master/experiment
gcbench  3072.8 ± 0.9%      58.3 ± 43.7%       104.9 ± 4.2%    3024.5 ± 0.4%          54.9 ± 23.0%           102.5 ± 2.8%               1.013        1.016 (***)             1.062                    1.023
-------  -------------  ----------------  -----------------  ---------------  --------------------  ---------------------  ------------------  -----------------  ----------------------  -----------------------

This info is only added for benchmarks using the GC harness via --harness=gc' or --category=gc`

@eightbitraptor eightbitraptor merged commit 54c9ebf into main Mar 17, 2026
11 checks passed
@eightbitraptor eightbitraptor deleted the mvh-add-gc-stats branch March 17, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants